package com.yang.crawler.file;

import java.io.FileNotFoundException;
import java.io.InputStream;

public interface IFileUploader {
    /**
     * 上传图片
     * @param directory 目录
     * @param filename 文件名
     * @param inputStream
     * @return 返回图片的url
     */
    String uploadFile(String directory, String filename, InputStream inputStream);

    InputStream downloadFile(String directory, String filename) throws FileNotFoundException;

    InputStream downloadFile(String url) throws FileNotFoundException;

    boolean isFileExist(String directory, String filename);
}
